<template>
  <div class="me-page">
    <!--<headBar  isBack="show">-->
      <!--<div slot="xm-header-center">-->
        <!--<div class="xm-header-title" >我的业务员</div>-->
      <!--</div>-->
      <!--<div slot="xm-header-right"></div>-->
    <!--</headBar>-->
    <div v-show="salesManList.length>0">
      <div class="head-bar"></div>
      <div class="saleCard">
        <div class="sale-group" v-for="item in salesManList">
          <div class="flex sale-info">
            <h3 class="flex-1">{{item.name}} <span>{{item.companyName}}</span></h3>
            <img src="../../assets/images/xm-logo-1.png" alt="">
          </div>
          <p class="icon icon-zaixiankefudianhua phone" @click="tel(item.cellphone)">{{item.cellphone}}</p>
        </div>
      </div>
    </div>
    <section class="sale-bottom">
      <div class="foot-bar">
        <router-link to="/shouhou">申请售后</router-link>
        <a href="javascript:void(0)" class="tel">电话联系</a>
      </div>
    </section>
    <!--数据为空-->
    <nodata textContent="还没有业务员哦" v-show="salesManList.length<=0"></nodata>

  </div>
</template>
<script>
  export default {
    props: {},
    data() {
      return {
          salesManList: []
      };
    },
    methods: {
        //获取业务员
        getSalesman() {
            getSalesman().then(data => {
                if (data.returnCode == '000000') {
                    this.salesManList = data.result;
                }
            }).catch(error => {
                console.log(error);
            })
        },
        tel(phone) {
            location.href = 'tel:' + phone;
        },
    },
    filters: {},
    created() {
      this.getSalesman();
    },
    mounted(){

    },
    components: {
    }
  };
</script>
<style lang="less" scoped>
  @import "./me.less";
  .sale-bottom{

    .foot-bar{
      position: fixed;
      width: 100%;
      bottom: 1rem;
      background: transparent;
      text-align: center;
      a{
        display: inline-block;
        width: 1.5rem;
        height: 1.5rem;
        line-height: 1.5rem;
        border-radius: 100%;
        text-align: center;
        background: #666666;
        box-shadow: 0 8px 16px 0 rgba(0,0,0,0.10);
        font-size: .26rem;
        color: #fff;
        &.tel{
          margin-left: 1.7rem;
          background: #6DCBFF;
          box-shadow: 0 8px 16px 0 rgba(0,0,0,0.10);
        }
      }
    }
  }
</style>
